﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mogre;

namespace ProjetSMA.View.Mogre
{
    public class Element3D
    {
        protected SceneManager m_scene_mngr;
        protected Vector3 m_position = new Vector3(0, 0, 0);
        protected Model.Element m_item;
        protected SceneNode m_node;
        protected SceneNode m_node_bis;
        protected float m_size = 20f;
        protected Entity m_entity;
        protected Entity m_entity_bis;
        protected String m_name;
        protected int m_height = 1;
        protected int m_coef = 5;
        protected float m_height_item;
        protected List<Entity3D> m_occupants_3D = new List<Entity3D>();
   

        public Element3D(Model.Element par_item, SceneManager par_smngr, string par_name)
        {
            m_scene_mngr = par_smngr;
            m_item = par_item;
            m_name = par_name;
        }

        public virtual void Initialisation()
        {
           
        }

        public void ColorChange()
        {
            foreach (Model.ItemMove item in m_item.Occupants)
            {
              //  item.PositionNow;
            }
        }


        public Vector3 Position
        {
            get { return m_position; }
            set { m_position = value; }
        }

        public SceneNode Node
        {
            get { return m_node; }
            set { m_node = value; }
        }
        
        public float Size
        {
            get { return m_size; }
            set { m_size = value; }
        }

         public float HeightItem
        {
            get { return m_height_item; }
            set { m_height_item = value; }
        }

        public string Name
        {
            get { return m_name; }
            set { m_name = value; }
        }

        public int height
        {
            get { return m_height; }
            set { m_height = value; }
        }

        public Model.Element ModelElement
        {
            get { return m_item; }
        }

        public Entity EntityElement
        {
            get { return m_entity; }
        }

        public Entity EntityBisElement
        {
            get { return m_entity_bis; }
        }

        public List<Entity3D> Occupants3D
        {
            get { return m_occupants_3D; }
            set { m_occupants_3D = value; }
        }

        public float Coefficient
        {
            get { return m_coef; }
        }
    }
}
